home *** CD-ROM | disk | FTP | other *** search
/ Amiga Mag HDD Backup / Amiga Mag HDD Backup.zip / Amiga Mag HDD Backup / Alexander.img.bin / Alexander.img / ***9.11 All NEWer important / Finch⁄5 Day Weather / Article.txt < prev    next >
Text File  |  1994-09-16  |  14KB  |  256 lines

  1. Create An Animated Five-Day Weather Forecast With DeluxePaint IV
  2.  
  3.  
  4.     Some time ago, I worked with our local NBC affiliate to
  5. create weather graphics for its local newscast. They had an
  6. Amiga 2000 and were using DeluxePaint for graphics production.
  7. The main weather maps were downloaded from the AccuWeather
  8. service; my job was to create specialized graphics. I created a
  9. five-day forecast, a severe weather map, and several other custom
  10. graphic screens. One of the things I worked on was an animated
  11. five-day forecast. It was created entirely in DeluxePaint. In
  12. this article, I will show you how to create this animated
  13. forecast. In a future article, I will show you how to use HELM
  14. to ease the process of building a five-day animated forecast on a
  15. daily basis.
  16.  
  17. The Screen Layout
  18.     Typically, a five-day forecast consists of a title at the
  19. top of the screen, five graphic elements for each of the five
  20. days, the names of the days, and a high and low temperature for
  21. each day. I will follow this same convention. The major
  22. difference is that instead of static graphics or color-cycled
  23. graphics as is typical, I will be using animated graphics
  24. complete with blinking sun, moving clouds, flashing lightning,
  25. and falling rain.
  26.     To start things off, a screen resolution and size needs to
  27. be selected. Since the output will ultimately be used in a
  28. television broadcast, the screen needs to be interlaced and
  29. overscan. The resolution of TV is not that great (compared to
  30. computer output, this is); therefore, a 16-color low resolution
  31. screen should be sufficient. The lower resolution will also
  32. ensure that the animated screen will run smoothly with no
  33. jerkiness. A maximum overscan of 368x482 will be used to make
  34. sure there is no border around the screen.
  35.     Now the palette needs to be set. I used a blue background.
  36. There is a yellow for text and lightning, some greens for the
  37. grass, some blues for the sky, and so on. Figure 1 shows the
  38. palette I selected.
  39.  
  40. The Building Blocks
  41.     Once the selected screen resolution and palette are set,
  42. the graphic elements to be used in the animated forecast need to
  43. be created. There are many different types of days that can
  44. occur: sunny, partly cloudy, rainy, stormy, snowy, haily, floody,
  45. etc. For this article, I will discuss the first five.
  46.     First, a basic screen design needs to be produced. Figure 2
  47. shows the template I created. From the top down, it has the
  48. title, a blank area for inserting the text indicating the days,
  49. five boxes for inserting the AnimBrushes that will be created,
  50. and color rectangles for inserting the high and low temperature
  51. for each day. It is rather plain, but it gets the job done. You
  52. can be as artistic as you like putting this template together.
  53.     Now it is time to build the static graphic elements that
  54. will be used to produce the forecast. Figures 3 and 4 show the
  55. ones I created. The top row of Figure 3 shows the core graphics
  56. that will be used in each AnimBrush. Each has a dithered green
  57. ground and a solid blue sky. The graphic on the left has a light
  58. blue sky and will be used for sunny days. The middle graphic has
  59. a medium blue sky that will be used for partly cloudy days. The
  60. graphic on the right has a dark blue sky that will be used for
  61. overcast days. Each of these graphics is sized to fit inside the
  62. hollow rectangular boxes in Figure 2. The graphics themselves
  63. are each 50x183 pixels in size. The middle row of Figure 3 shows
  64. five singular elements (cloud, lightning bolt, sun, raindrop, and
  65. snowflake). The bottom row shows groupings of four of the
  66. elements. These groupings will be used to create the
  67. AnimBrushes. The three graphics at the top, the sun, and the four
  68. element groupings at the bottom of the figure should each be
  69. saved as separate brushes.
  70.     Figure 4 shows seven different brushes, each containing the
  71. names of five days of the week. Each brush starts with a
  72. different day. These brushes were designed to fit inside the
  73. blank area above the five empty boxes in Figure 1. Thus, for any
  74. given day, the days of the week can be added by simply loading
  75. the appropriate brush and pasting it in the appropriate location
  76. on the template.
  77.  
  78. A Sunny Day
  79.     Now it is time to create the first AnimBrush. Clear the
  80. screen in DeluxePaint, load the brush containing the graphic with
  81. the light blue sky, and then choose Color/Palette/Use Brush
  82. Palette from the menu. This will set the screen palette to that
  83. of the brush. Now paste the brush in the middle of the screen.
  84. After some experimentation, I decided that a 10-frame animation
  85. running at 10 frames per second looked quite good. So, from the
  86. menu choose Anim/Frames/Set #, enter 10, and select OK. Also,
  87. from the menu, choose Anim/Control/Set Rate and enter 10. This
  88. will set the frame rate. At this point you will have a 10-frame
  89. animation with each frame containing the pasted brush in the
  90. middle of the screen.
  91.     Load the sun brush and paste it down on the first frame in
  92. the blank blue area away from the ground and sky graphic. Notice
  93. that the sun is not symmetric. By rotating the brush 90 degrees,
  94. a slightly different looking sun can be created for the next
  95. frame of the animation. Choose the menu item Brush/Rotate/90
  96. degrees. This will create a short wide sun due to the odd aspect
  97. ratio of a 368x482 screen. To resize this alternate image of the
  98. sun to better match the original image, choose the menu item
  99. Brush/Size/Halve once and Brush/Size/Double Vert twice. Position
  100. the resized brush over top of the original sun in frame one,
  101. press the 2 key to jump to the second frame, and paste the
  102. altered sun brush to the screen. By alternately pressing the 1
  103. (previous frame) and the 2 (next frame) keys, you can see how
  104. good the "blinking" sun looks. Redo these steps if necessary.
  105.     Now it is time to add the sun to the light blue sky. Go to
  106. frame one. Choose Anim/AnimBrush/Pick Up from the menu. Draw a
  107. box around the sun, and when asked how many cels, type in 2. This
  108. creates a two-frame AnimBrush of the sun. The frames are
  109. slightly different from each other so it gives a slight motion to
  110. the sun. To see how the blinking sun looks, hold down the 7 key.
  111. This will cycle the AnimBrush frames. Save the AnimBrush by
  112. selecting the Anim/AnimBrush/Save menu item. After saving,
  113. position the sun AnimBrush in the light blue sky of the graphic
  114. in the center of the screen on frame one. Paste the AnimBrush.
  115. Press the M key (must be capital) to bring up the Move requester.
  116. Make sure all of the settings are as shown in Figure 5 and press
  117. the Draw button. This will cause the two-frame AnimBrush to be
  118. pasted on each frame of the animation, alternating the two sun
  119. images for consecutive frames. The result is a ten-frame
  120. animation of a blinking sun in the light blue sky. To see how
  121. the animation looks, press the 4 key. Pressing the Esc key will
  122. stop the animation.
  123.     Make sure frame one is displayed and select the
  124. Anim/AnimBrush/Pick Up menu item. Draw a box around the ground
  125. and sky graphic and type in 10 when asked how many cels. Click
  126. on OK. A 10-frame AnimBrush containing the entire ground and sky
  127. graphic with a blinking sun will be created. It should be saved
  128. for later use.
  129.  
  130. A Partly Cloudy Day
  131.     A partly cloudy day consists of a sun with some clouds.
  132. Since the blinking sun AnimBrush has just been created, it can be
  133. used as the base for this graphic. However, the sky needs to be
  134. a medium blue. Therefore, there are two approaches that can be
  135. used. First, the sky in all ten frames of the sunny day
  136. animation can be filled with the medium blue color. Second, the
  137. ground and medium blue sky graphic brush can be loaded and the
  138. steps to create the sunny day AnimBrush repeated. Either way is
  139. okay, but the first way is faster.
  140.     Once a 10-frame animation of the ground and medium blue sky
  141. with a blinking sun is in place, the moving clouds need to be
  142. added. Load the five-cloud grouping brush. Notice that there are
  143. two cloud layers in the grouping. The top layer has three clouds
  144. and the bottom has two. The clouds in each layer are
  145. purposefully offset from each other by 55 pixels. If the brush
  146. is moved horizontally the 50 pixel width of the ground and sky
  147. graphic over 10 frames (five pixels per frame), then frame one,
  148. which will come after frame 10 (the animation loops), will look
  149. identical to how frame 11 would have looked if it existed. This
  150. allows the cloud movement to be smooth as the animation loops.
  151.     So, let's do it. Paste the cloud grouping on the screen
  152. such that the lower right-most cloud is centered horizontally in
  153. the sky. Press M to bring up the Move requester. Select a value
  154. of 50 for the X Distance and make sure the value of Count is 10.
  155. Click on the Draw button. The clouds will be pasted to each
  156. frame of the animation with a five-pixel offset between frames.
  157. Pick up an AnimBrush consisting of the ground and sky graphic
  158. area and save it. Now clear all frames of the animation and
  159. paste the AnimBrush on frame 1. Use the Move requester to add it
  160. to each frame in the same way the sun was added earlier (X
  161. Distance set to zero). Play the animation. The clouds will move
  162. across the sky. As the clouds disappear off to the right, new
  163. clouds will appear from the left.
  164.  
  165. A Rainy Day
  166.     For the rainy day graphic, no sun will be shown. Go to
  167. frame one and clear all the frames by pressing the CLR button and
  168. then selecting All Frames from the requester. Load the ground and
  169. dark blue sky graphic and paste it on the first frame. Use the
  170. Move requester to copy it to all frames. Next, create the moving
  171. clouds just as was done for the partly cloudy day. Go to frame
  172. one and load the raindrop grouping brush. Paste it on the screen
  173. such that the upper left corner of the brush is in the upper left
  174. corner of the sky, but such that the top raindrop is no higher
  175. than the middle of the top cloud layer. Bring up the Move
  176. requester. Set the X Distance to about 10, the Y Distance to
  177. about -70 (remember Y increases upward in DeluxePaint), and Count
  178. to 10. Click on the Preview button. Look closely at how the
  179. raindrops appear as they fall towards the ground. Adjust the X
  180. and Y Distances until they appear the way you want. Finally,
  181. press the Draw button. Again, pick up the graphic as an AnimBrush
  182. and save it. To make the rainfall appear harder, repeat the steps
  183. for adding the raindrop grouping but begin the brush movement in
  184. frame five or six. The movement will loop around to frame one
  185. and continue until 10 frames have been drawn.
  186.  
  187. A Stormy Day
  188.     The stormy day will be just like the rainy day but with some
  189. lightning added. So, while on frame one of the rainy day
  190. animation, load the lightning bolt grouping brush. All that is
  191. needed is to add the lightning to various frames of the rainy day
  192. animation so that the lightning appears to be flashing on and
  193. off. I found that lightning bolts on frames 1, 2, 5, and 6 look
  194. quite good. It gives the appearance of two quick flashes and then
  195. a pause. Make sure the lightning bolts are in the same position
  196. in each frame to which they are added. This is best done by
  197. positioning the bolts at the appropriate location in the sky and
  198. pressing the Left Alt-Left Amiga key combination (same as
  199. pressing the left mouse button). Go to the next frame to which
  200. the bolts will be added by pressing the 2 key to advance frames.
  201. Paste the bolts with the same key combination. This method will
  202. prevent the slight movement that can occur when trying to hold
  203. the mouse steady.
  204.  
  205. A Snowy Day
  206.     This one is quite simple now that the other ones have been
  207. created. Simply create the moving clouds on a dark blue sky as
  208. for the rainy day animation. Now, instead of adding falling
  209. raindrops, simply add falling snowflakes using the snowflake
  210. grouping brush.
  211.  
  212. Other Days
  213.     What other type of days can you think of? Hail? How would
  214. you portray it in the AnimBrush? Perhaps the snowfall will be
  215. big. The ground could be changed to white for that one. There
  216. are many different types of days that can be created. Play
  217. around with it. Let your creative juices flow.
  218.  
  219. Putting It All Together
  220.     Now that the AnimBrushes for the various type of days have
  221. been created and saved (you did remember to save them all, didn't
  222. you?), it is time to bring everything together for an actual
  223. five-day forecast. Delete all the animation frames so there is
  224. only the one DeluxePaint work screen. This can be done by setting
  225. the number of frames to one. Load the five-day forecast template
  226. (Figure 2). Then load the appropriate brush containing the names
  227. of the five days to be forecast. Paste is under the title in the
  228. appropriate position above the five empty boxes.
  229.     Next, select the font and font size to use for the
  230. temperatures. Type the low and high temperatures for each day in
  231. the appropriate rectangles. Set the number of frames to 10; the
  232. filled in template will be copied to all frames.
  233.     Load the AnimBrush that represents the type of weather that
  234. will prevail on the first day of the forecast. Paste it inside
  235. the left-most box of frame one. Use the Move requester to paste
  236. it to each frame of the animation. Do the same for the second
  237. day, the third, and so on until all five days have AnimBrushes
  238. associated with them.
  239.     The animation is now complete. It can be saved as an Anim
  240. file for use in a presentation package. Figure 6 shows frame two
  241. of a sample I created. Figure 7 shows frame seven of the same
  242. sample. I wish I could put the animation in the magazine, but
  243. technology has not reached that point yet. You will just have to
  244. put one together yourself. Or, if you prefer, you can write me
  245. care of this magazine and I will send you a disk for a small fee.
  246.  
  247. Conclusions
  248.     I hope you have had fun working through this tutorial. Using
  249. DeluxePaint to build the final five-day forecast can be a bit
  250. cumbersome since you must manually load the brushes and paste
  251. them in the right location. Probably the most time consuming
  252. task is typing in the temperatures. In a follow up article, I
  253. will show you how to automate these tasks using HELM.
  254.     If you put together something like this for a TV station, I
  255. would like to know about it. See you next time.
  256.